{smcl}
{* 2015-11-19 scott long}{...}
{title:Title}

{p2colset 5 19 21 2}{...}
{p2col:{cmd:sposthelp} {hline 2}}Getting help for SPost problems
{p_end}
{p2colreset}{...}
{p2colset 5 17 20 2}{...}

{title:Overview}

{p 4 4 2}
If you are having a problem, here is what we suggest after you have
read the relevant sections in our book and the help files for the command
you are having problems with.

{p 4 4 2}
Step 1. Update Stata and SPost.

{p 4 4 2}
Step 2. Check your data and model.

{p 4 4 2}
Step 3. If it is an m* command, look at the -margins- output.

{p 4 4 2}
Step 4. Send us a do-file, log file, and data that shows the error.

{title:Step 1. Update Stata and SPost}


{p 4 4 2}Step 1a. Install the most recent update to Stata. Type -help update- in Stata.

{p 4 4 2}Step 1b. Install the latest version of SPost using -adoupdate, update-.

{p 4 4 2}Step 1c. In rare cases, you will need to uninstall SPost and then reinstall it.

{title:Step 2. Check your data and model.}

{p 4 4 2}Step 2a. Check your descriptive statistics to make sure your variable
are what you think they are.

{p 4 4 2}Step 2b. Try a simpler specification of the model using the same data. Start with
a single predictor. If that works, continue to add one variable at a time
till the problem occurs. Verify that the variable causing problems is
correct.

{p 4 4 2}Step 2c. Include only letters, numbers, and underscores in your value labels.
This shouldn't be a problem, but sometimes it is.

{p 4 4 2}Step 2d. Try the same analysis with another dataset to determine
if your problem is data dependent. Before you do this, you might
try Step 3 first.

{title:Step 3. Is the error caused by -marigns-?}

{p 4 4 2}Step 3a. The -m*- commands are based on Stata's -margins- command. If the
error message comes from -margins-, it might not be a problem with the
SPost command.

{p 4 4 2}Step 3b. Run the -m*- with the -details- option. For example,
-mtable, at(female=(0 1))- becomes -mtable, at(female=(0 1)) details-.
If the error is generated by -margins-, look at the -margins- documentation.

{title:Step 4. Send us a sample program that shows the problem.}

{p 4 4 2}Step 4a. Do not send large files or zip files since they might
be rejected by the IU system.
Ideally, create a Dropbox folder and send an invitation.

{p 4 4 2}Step 4b. Create the simplest do-file that generates
the problem.

{p 6 6 2}Step 4b1. Log the output to a text file,
not a smcl file (e.g., -log using jslong, text replace-).
Send the log file along with the do-file and the data.

{p 6 6 2}Step 4b2. Include your name and contact information.

{p 6 6 2}Step 4b3. Briefly describe the problem.

{p 6 6 2}Step 4b4. Add the command -spost13which-.

{p 6 6 2}Step 4b5. Load the data. Do not refer to specific directories.
For example, do not: -use c:\data\project3\sample.dta-. Instead,
-use sample.dta-.

{p 6 6 2}Step 4b6. Include descriptive statistics for the variable
used in the commands that cause a problem.
For categorical variables, tabulate the values.

{p 6 6 2}Step 4b7. Add the commands that create the error.
Delete all commands not needed to demonstrate the error.

{p 4 4 2}
Your do file might look like this:

{p 8 8 2}
capture log close

{p 8 8 2}
log using scott_long, replace text

{p 8 8 2}
// scott long - 2014-09-01 (jslong@indiana.edu)

{p 8 8 2}
// mtable includes missing values in the predictions

{p 8 8 2}
spost13which

{p 8 8 2}
use scott_long_data, clear

{p 8 8 2}
// descriptive statistic look fine

{p 8 8 2}
desc y x1 x2

{p 8 8 2}
tab y

{p 8 8 2}
sum x1 x2

{p 8 8 2}
// logit model gives reasonable results

{p 8 8 2}
logit y x1 x2

{p 8 8 2}
// error: the change coefficients for x2 are missing values

{p 8 8 2}
mtable, at(x1=(0 1))

{p 8 8 2}
log close

{p 8 8 2}
exit

INCLUDE help spost13_footer
